
### Application-specific constants
APP_NAME := app_test

### Environment constants 
CROSS_COMPILE ?= 
ARCH ?= 

### Constant symbols
CC := $(CROSS_COMPILE)gcc
AR := $(CROSS_COMPILE)ar

### include & options
CFLAGS := -O2 -Wall -I.

### Linking options
LIBS := 

####General build target
all : $(APP_NAME)

clean:
	rm -f obj/*.o
	rm -f $(APP_NAME)

### Sub-modules compilation
obj/uartToLoraFrame.o: uartToLoraFrame.c uartToLoraFrame.h
	$(CC) -c $(CFLAGS) $< -o $@

obj/$(APP_NAME).o: $(APP_NAME).c uartToLoraFrame.h
	$(CC) -c $(CFLAGS) $< -o $@

### Main program compilation and assembly
$(APP_NAME): obj/$(APP_NAME).o obj/uartToLoraFrame.o
	$(CC) $< obj/uartToLoraFrame.o -o $@ $(LIBS)

###EOF
